home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / xfs / jdm.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-10-04  |  2.4 KB  |  83 lines

  1. /*
  2.  * Copyright (c) 2000-2002, 2005 Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This program is free software; you can redistribute it and/or
  6.  * modify it under the terms of the GNU Lesser General Public License
  7.  * as published by the Free Software Foundation.
  8.  *
  9.  * This program is distributed in the hope that it would be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU Lesser General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Lesser General Public License
  15.  * along with this program; if not, write the Free Software Foundation,
  16.  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  17.  */
  18. #ifndef __JDM_H__
  19. #define __JDM_H__
  20.  
  21. typedef int    intgen_t;
  22. typedef void    jdm_fshandle_t;        /* filesystem handle */
  23. typedef void    jdm_filehandle_t;    /* filehandle */
  24.  
  25. struct xfs_bstat;
  26. struct attrlist_cursor;
  27. struct parent;
  28.  
  29. extern jdm_fshandle_t *
  30. jdm_getfshandle( char *mntpnt);
  31.  
  32. extern void
  33. jdm_new_filehandle( jdm_filehandle_t **handlep,    /* new filehandle */
  34.             size_t *hlen,        /* new filehandle size */
  35.             jdm_fshandle_t *fshandlep,    /* filesystem filehandle */
  36.             struct xfs_bstat *sp);    /* bulkstat info */
  37.  
  38. extern void
  39. jdm_delete_filehandle( jdm_filehandle_t *handlep,/* filehandle to delete */
  40.                size_t hlen);        /* filehandle size */
  41.  
  42. extern intgen_t
  43. jdm_open( jdm_fshandle_t *fshandlep,
  44.       struct xfs_bstat *sp,
  45.       intgen_t oflags);
  46.  
  47. extern intgen_t
  48. jdm_readlink( jdm_fshandle_t *fshandlep,
  49.           struct xfs_bstat *sp,
  50.           char *bufp,
  51.           size_t bufsz);
  52.  
  53. extern intgen_t
  54. jdm_attr_multi(    jdm_fshandle_t *fshp,
  55.         xfs_bstat_t *statp,
  56.         char *bufp, int rtrvcnt, int flags);
  57.  
  58. extern intgen_t
  59. jdm_attr_list(    jdm_fshandle_t *fshp,
  60.         xfs_bstat_t *statp,
  61.         char *bufp, size_t bufsz, int flags,
  62.         struct attrlist_cursor *cursor);
  63.  
  64. extern int
  65. jdm_parents( jdm_fshandle_t *fshp,
  66.         xfs_bstat_t *statp,
  67.         struct parent *bufp, size_t bufsz,
  68.         unsigned int *count);
  69.  
  70. extern int
  71. jdm_parentpaths( jdm_fshandle_t *fshp,
  72.         xfs_bstat_t *statp,
  73.         struct parent *bufp, size_t bufsz,
  74.         unsigned int *count);
  75.  
  76. /* macro for determining the size of a structure member */
  77. #define sizeofmember( t, m )    sizeof( ( ( t * )0 )->m )
  78.  
  79. /* macro for calculating the offset of a structure member */
  80. #define offsetofmember( t, m )    ( ( size_t )( char * )&( ( ( t * )0 )->m ) )
  81.  
  82. #endif    /* __JDM_H__ */
  83.